import request from "@/utils/request";

export function getList(params) {
    return request({
        url: "/v1/server",
        method: "get",
        params,
    });
}

export function addServer(data) {
    return request({
        url: "/v1/server",
        method: "post",
        data,
    });
}

export function delServer(sev_id) {
    return request({
        url: "/v1/server",
        method: "delete",
        data: { sev_id: sev_id },
    });
}

export function updateServer(data) {
    return request({
        url: "/v1/server",
        method: "put",
        data,
    });
}

export function testConnection(params) {
    return request({
        url: "/v1/servertest",
        method: "get",
        params,
    });
}